<%@ page language="java" pageEncoding="ISO-8859-1"%>


<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html:html locale="true">

   <head>

    <html:base />

    

    <title>PoliceDist.jsp</title>


	<meta http-equiv="pragma" content="no-cache">

	<meta http-equiv="cache-control" content="no-cache">

	<meta http-equiv="expires" content="0">    

	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

	<meta http-equiv="description" content="This is my page">

	<!--

	<link rel="stylesheet" type="text/css" href="styles.css">

	-->

<script type="text/javascript">


function checkblank(this)

{

   a=f.pdid.value;

   b=f.pdn.value;

   c=f.pdh.value;

   d=f.T2.value;


if((a.length==0) || (b.length==0) || (c.length==0)||(d.length==0))

{

    if(a.length==0)

      {

         document.getElementById("lpdid").innerHTML="<font color=red>This field shdnt be left blank</font>"

      }

      if(b.length==0)

      {

         document.getElementById("lpdn").innerText="This field shdnt be left blank"

      }

      if(c.length==0)

      {

         document.getElementById("lpdh").innerText="This field shdnt be left blank"

      }

      if(d.length==0)

      {

         document.getElementById("led").innerText="This field shdnt be left blank"

      }

      return false;

   

}


</script>
<script language="javascript" type="text/javascript" src="datetimepicker_css.js"></script>


 <link href="css/style1.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="main-out">
<div class="main">
<div class="page">
<div class="top">
<div class="header">
<div class="header-top">
<%@include file="TopHead.jsp" %>
</div>
<div class="topmenu">
<%@include file="TopMenu.jsp" %>
</div>
<div class="">
<img src="images/d3.gif">
</div>
</div>
<div class="content">
<div class="content-left">
<div class="row1">
<div class="img">&nbsp;</div>
<div class="welcome">
<h1 class="title">Welcome to POlice Seva<span></span></h1>
<p>




</p>

  <%

    Object ob= request.getAttribute("PIDVALUE");

    Object ob1=request.getAttribute("DATA");

    %>

    

  <html:form action="apda" onsubmit="return checkblank(this)"> 

<div align="center">

	<table border="0" width="50%">

	  <%if(ob!=null){ %>

		<tr>

			<td width="302">Police District ID</td>

			<td><html:text readonly="true" property="pdid" value="<%=ob.toString()%>"> </html:text> </td>

			<td><label id="lpdid"></label></td>

		</tr>
  
		
      <%} %>
		 <%if (ob1!=null) 

			 {

			 %>
			 

			

		
			 <tr>

			<td width="302">Police District Name</td>

			<td><html:text property="pdn" value=""></html:text> </td>

			<td><label id="lpdn"></label></td>

		</tr>

		<tr>

			<td width="302">Police District Headquater</td>

			<td><html:text property="pdh" value=""></html:text> </td>

			<td><label id="lpdh"></label></td>

		</tr>

		<tr>

			<td width="302">Effect Date</td>

			<td width="76%">
<input type="text" name="T2" id="demo3" size="20" readonly="readonly" onfocus="javascript:NewCssCal('demo3','ddMMMyyyy','arrow')" value="">
</td>


			<td><label id="led"></label></td>

		</tr>

		<tr>

			<td width="302">&nbsp;</td>

			<td>&nbsp;</td>

		</tr>

		<tr>

			<td colspan="2"><html:submit value="AddPoliceDistrict" property="apdp"></html:submit> </td>

		</tr>

		<tr>

			<td width="302">&nbsp;</td>

			<td>&nbsp;</td>

		</tr>

			 

			 

			 

			 

			 

		<tr>

			<td colspan="2"><%=ob1.toString() %></td>

		</tr>

		<%} 
else
{

%>

<tr>

			<td width="302">Police District Name</td>

			<td><html:text property="pdn"></html:text> </td>

			<td><label id="lpdn"></label></td>

		</tr>

		<tr>

			<td width="302">Police District Headquater</td>

			<td><html:text property="pdh"></html:text> </td>

			<td><label id="lpdh"></label></td>

		</tr>

		<tr>

			<td width="302">Effect Date</td>

			<td width="76%">
<input type="text" name="T2" id="demo3" size="20" readonly="readonly" onfocus="javascript:NewCssCal('demo3','ddMMMyyyy','arrow')">
</td>

			<td><label id="led"></label></td>

		</tr>

		<tr>

			<td width="302">&nbsp;</td>

			<td>&nbsp;</td>

		</tr>

		<tr>

			<td colspan="2"><html:submit value="AddPoliceDistrict" property="apdp"></html:submit> </td>

		</tr>




<%

}
		

		%>

		<tr>

			<td colspan="2"><a href="<%=request.getContextPath()%>/apda.do?apdp=view">View/Edit</a></td>

		</tr>

	</table>

</div>

</html:form>







</div>
</div>

</div>
<div class="content-right">
<%@include file="SideMenu.jsp" %>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
</div>
<div class="bottom">
<!--DO NOT Remove The Footer Links-->
<p><%@include file="Footer.jsp"  %><br>
<!--DO NOT Remove The Footer Links-->
</p>
</div>
</div>
</div>
</div>
</body>
</html:html>
